package com.base.andlangui.weight

import android.widget.ImageView
import com.base.andlangui.weight.GlideUtils.loadCenterCorp
import com.bumptech.glide.Glide

/**
 * 图片加载相关工具
 */
object GlideUtils {
    fun ImageView.loadUrl(url:String){
        Glide.with(this.context).load(url).into(this)
    }
    fun ImageView.loadFitCenter(url:String){
        Glide.with(this.context).load(url).fitCenter().into(this)
    }
    fun ImageView.loadCenterCorp(url:String){
        Glide.with(this.context).load(url).centerCrop().into(this)
    }
    fun ImageView.loadCircleCorp(url:String){
        Glide.with(this.context).load(url).circleCrop().into(this)
    }
}